using UnityDemo.LoggingUtility;

namespace UnityDemo.InstanceManagerCode.LifeTimeModels
{
    internal abstract class BaseInstance : ILifeTime
    {
        public BaseInstance()
        {
            LogerInstance.Logger.Initialize(this);
        }

        #region ILifeTime Members

        public void PrintHashCode()
        {
            int id = GetHashCode();
            LogerInstance.Logger.Initialize(this);
            LogerInstance.Logger.Info(GetType().Name + " Instance has code " + id);
        }

        #endregion

        public void PrintHashCode(int threadID)
        {
            int id = GetHashCode();
            LogerInstance.Logger.Info(GetType().Name + " Instance hash code " + id + " with Thread id =" + threadID);
        }
    }
}